#pragma once
#include<easyx.h>
#include<windows.h>

#define WindowHeight 900
#define WindowWidth 900

#define GridSize 20
#define GameSceneBoundaryRight 850
#define GameSceneBoundaryLeft 50
#define GameSceneBoundaryTop 50
#define GameSceneBoundaryBottom 850

#define BodyMaxLength 500

#define ButtonWidth 200
#define ButtonHeight 160
#define ExitButtonWidth 200
#define ExitButtonHeight 140

int FPS = 10;
bool RunningState = true;
bool Playbgm = true;
bool Reset = false;
bool SpeedUp = true;
bool SpeeddDown = false;
bool is_speeding = false;
bool is_esc = false;

const int GameSceneSizeHorizental = (GameSceneBoundaryRight - GameSceneBoundaryLeft) / GridSize;
const int GameSceneSizeVirtical = (GameSceneBoundaryBottom - GameSceneBoundaryTop) / GridSize;
const int GameSceneSizeVirtiacal_Bit = GameSceneBoundaryBottom - GameSceneBoundaryTop;

const int ButtonPositionX = (WindowWidth - ButtonWidth) / 2;
const int ButtonPositionY = (WindowHeight - ButtonHeight) / 2+50;
const int ExitButtonPositionX = WindowWidth - ExitButtonWidth-25;
const int ExitButtonPositionY = WindowHeight - ExitButtonHeight-25;

int cent = 0;
int highest_score;

enum class Scene
{
	MainMenu,
	GameScene
};

enum class Button
{
	Unactive,
	Active
};

inline void putimage_alpha(int x, int y, IMAGE* img)
{
	int w = img->getwidth();
	int h = img->getheight();
	AlphaBlend(GetImageHDC(NULL), x, y, w, h,
		GetImageHDC(img), 0, 0, w, h, { AC_SRC_OVER, 0, 255, AC_SRC_ALPHA });
}
